package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;
import com.itheima.pojo.OrdersetDEV;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OrderSetMapper {
    /**
     * 修改可预约人数
     * @param ordersetDEV
     */
    @Update("update t_ordersetting set number=#{number} where orderDate=#{orderDate}")
    void update(OrdersetDEV ordersetDEV);

    /**
     * 查询预约信息
     * @param month
     * @return
     */
    @Select("select * from t_ordersetting where orderDate like concat('%',#{orderDate},'%')")
    List<OrderSetting> list(String month);

    /**
     * 文件上传
     * @param orderDate
     * @param number
     */
    @Insert("insert into t_ordersetting (orderDate, number,reservations) values (#{orderDate},#{number},#{reservations})")
    void insert(String orderDate, String number,String reservations);
}
